import request from "../helpers/Request";
const prefix = "group"


const getGroupList = async(data) => {
    const res = await request.sendCommand("list", data, prefix);
    return res;
}
const getMemberList = async(data) => {
    const res = await request.sendCommand("member_list", data, prefix);
    return res;
}
const getMemberDetail = async(data) => {
    const res = await request.sendCommand("member_detail", data, prefix);
    return res;
}
const quitGroup = async(data) => {
    const res = await request.sendCommand("quit", data, prefix);
    return res;
}
const createGroup = async(data) => {
    const res = await request.sendCommand("create", data, prefix);
    return res;
}
const inviteFriend = async(data) => {
    const res = await request.sendCommand("invite_friend", data, prefix);
    return res;
}
const modifyGroupName = async(data) => {
    const res = await request.sendCommand("modify_name", data, prefix);
    return res;
}
const modifyGroupNotice = async(data) => {
    const res = await request.sendCommand("modify_notice", data, prefix);
    return res;
}
const removeGroupMember = async(data) => {
    const res = await request.sendCommand("remove_member", data, prefix);
    return res;
}
const agreeGroupInvite = async(data) => {
    const res = await request.sendCommand("agree_invite", data, prefix);
    return res;
}


export  {
    getGroupList,
    getMemberList,
    getMemberDetail,
    quitGroup,
    createGroup,
    modifyGroupName,
    modifyGroupNotice,
    removeGroupMember,
    inviteFriend,
    agreeGroupInvite
}